package cn.web;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

//@WebListener

public class SchoolSessionListener implements HttpSessionListener {

	@Override
	public void sessionCreated(HttpSessionEvent s) {
		System.out.println("session创建于：" + new java.util.Date(s.getSession().getCreationTime()));
		System.out.println("session id=" + s.getSession().getId());
	}

	@Override
	public void sessionDestroyed(HttpSessionEvent s) {
		System.out.println("session id=" + s.getSession().getId() + "销毁于：" + new java.util.Date());
	}

}
